package com.xl.observer.special;

import java.util.ArrayList;
import java.util.List;

public abstract class WeatherSubject {

    public List<WeatherObserver> observers = new ArrayList<>();

    public void attach(WeatherObserver observer) {
        observers.add(observer);
    }

    public void deltach(WeatherObserver observer) {
        observers.remove(observer);
    }

    protected abstract void notifyObserver();
}
